<template>
<div>
  <button @click="showPicker = true"></button>
  <cube-picker :data="datas" @cancel="close" @select="selectDate" :show="showPicker"></cube-picker>
  </div>
</template>

<script type="label/ecmascript-6">
  import cubePicker from '../../components/cubePicker.vue'
  export default {
    components: {cubePicker},
    data () {
      return {
        showPicker: false,
        datas: [{ value: 1, label: 'A' }, { value: 2, label: 'B' }, { value: 3, label: 'C' }],
      }
    },
    mounted () {
      // this.datas = [{ value: 1, label: 'A' }, { value: 2, label: 'B' }, { value: 3, label: 'C' }]
      console.log(this.datas)
    },
    methods: {
      close () {
        this.showPicker = false
      },
      selectDate () {
        this.showPicker = false
      }
    }
  }
</script>
